﻿<Window x:Class="BookvarWpf.Windows.ErrorWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:r="clr-namespace:Bookvar.UI.Localization;assembly=Bookvar.UI"
        Title="{r:Resources ErrorWindowTitleText}" 
        Height="480" 
        Width="640"
        Background="{StaticResource ListBackground}"
    >
    <Window.Resources>
        <Style TargetType="Button" x:Key="errorButton">
            <Setter Property="HorizontalAlignment" Value="Center"></Setter>
            <Setter Property="VerticalAlignment" Value="Center"></Setter>
            <Setter Property="Margin" Value="10,2,15,2"></Setter>
            <Setter Property="Height" Value="22"></Setter>
            <Setter Property="BorderBrush" Value="#FF536B88"></Setter>
            <Setter Property="Background" Value="{StaticResource BlueButtonStyleBrush}"></Setter>
        </Style>
    </Window.Resources>
  <Grid Name="root">
    <Grid.RowDefinitions>
      <RowDefinition Height="*"/>
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
      <ColumnDefinition />
    </Grid.ColumnDefinitions>
    <Grid x:Name="errorDetails" Grid.Row="0">
      <Grid.RowDefinitions>
        <RowDefinition Height="30" />
        <RowDefinition Height="*"/>
        <RowDefinition Height="35" />
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition />
      </Grid.ColumnDefinitions>
      <Label Grid.Row="0" Content="{r:Resources ErrorWindowExceptionStackText}" />
      <ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
        <TextBlock Name="tbStack" ScrollViewer.VerticalScrollBarVisibility="Auto" 
                   ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.CanContentScroll="True" />
      </ScrollViewer>
      <StackPanel Grid.Row="2" Orientation="Horizontal">
        <Button Click="SendErrorClicked" Content="{r:Resources ErrorWindowSendErrorText}" Style="{StaticResource errorButton}" />
        <Button Click="CopyToClipboardClicked" Content="{r:Resources ErrorWindowCopyToClipboardText}" Style="{StaticResource errorButton}" />
      </StackPanel>
    </Grid>
  </Grid>
</Window>
